{% if pages <=1 %}
{% else %}
<div class="pages">
    <div class="pages-pr">
        {% if page <=1 %}
        <span></span>
        {% else %}
        <a href="?cateid={{ cateid }}&page={{ page-1 }}">上一页</a>
        {% endif %}
    </div>
    <div class="pages-center">
        {% if pages<=1 %}
        <a href="javascript:;" class="active">{{ page }}</a>
        {% else %}
        {% if page <= 1 %}
        <a href="javascript:;" class="active">{{ page }}</a>
        <a href="?page={{ page+1 }}">{{ page+1 }}</a>
        {% else %}
        <a href="?page={{ page-1 }}">{{ page-1 }}</a>
        <a href="javascript:;" class="active">{{ page }}</a>
        {% if !(page >= pages) %}
        <a href="?page={{ page+1 }}">{{ page+1 }}</a>
        {% endif %}
        {% endif %}
        {% endif %}
        <span>...</span>
        <span class="pages-tj">(共{{ pages }}页 / 总{{ count }}条 / 每页{{ num }}条 / 当前第{{ page }}页)</span>
    </div>
    <div class="pages-ne">
        {% if page >=  pages  %}
        <span></span>
        {% else %}
        <a href="?cateid={{ cateid }}&page={{ page+1 }}">下一页</a>
        {% endif %}
    </div>
</div>
{% endif %}
